Skip to content

Conversation

mugikhan
Copy link
Contributor

@mugikhan mugikhan commented Oct 15, 2024

Description

This PR introduces encryption for OPSQLite databases using SQLCipher. This ensures that the data stored in your SQLite database is highly secure and resistant to unauthorized access.

Usage

Add the SQLCipher configuration option to your application's package.json

{
  "op-sqlite": {
    "sqlcipher": true
  }
}

Update the OPSQLite factory options to include an encryption key:

const factory = new OPSqliteOpenFactory({
  dbFilename: 'sqlite.db',
  sqliteOptions: {
    encryptionKey: 'your-encryption-key'
  }
});

Work done

  • Updated the OPSQLite factory options to specify an encryption key
  • Upgrade OPSQLite to latest version
  • Updated the README for instructions on how to enable encryption

Copy link

changeset-bot bot commented Oct 15, 2024

🦋 Changeset detected

Latest commit: 4e214bb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/op-sqlite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mugikhan mugikhan merged commit 214e884 into main Oct 15, 2024
5 checks passed
@mugikhan mugikhan deleted the feat/sqlcipher-op-sqlite branch October 15, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants